﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="backstage_navigation_category_set" Codebehind="navigation_category_set.aspx.cs" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>分类导航 </title>
    <link href="css/skin.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript" src="js/main.js"></script>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>

<script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"
    charset="utf-8"></script>

<script type="text/javascript">
    ///验证主页分类导航表单
    function checkNavigationCategoryForm() {
        var menuCategory = document.getElementsByName("menuCategory");
        var newsCategory = document.getElementsByName("newsCategory");
        var promotionCategory = document.getElementsByName("promotionCategory");
        var moduleCategory = document.getElementsByName("moduleCategory");
        var menuCategoryMaxCount = '<%=menuCategoryMaxCount %>';
        var newsCategoryMaxCount = '<%=newsCategoryMaxCount %>';
        var promotionCategoryMaxCount = '<%=promotionCategoryMaxCount %>';
        var moduleCategoryMaxCount = '<%=moduleCategoryMaxCount %>';
        var count = 0;
        var count1 = 0;
        var count2 = 0;
        var count3 = 0;
        for (var i = 0; i < menuCategory.length; i++) {
            if (menuCategory[i].checked)
                count++;
        }
        if (count > menuCategoryMaxCount) {
            alert("菜单分类导航最多只能选择" + menuCategoryMaxCount + "项！");
            return false;
        }
        for (var i = 0; i < newsCategory.length; i++) {
            if (newsCategory[i].checked)
                count1++;
        }
        if (count1 > newsCategoryMaxCount) {
            alert("新品分类导航最多只能选择" + newsCategoryMaxCount + "项！");
            return false;
        }
        for (var i = 0; i < promotionCategory.length; i++) {
            if (promotionCategory[i].checked)
                count2++;
        }
        if (count2 > promotionCategoryMaxCount) {
            alert("促销分类导航最多只能选择" + promotionCategoryMaxCount + "项！");
            return false;
        }
        for (var i = 0; i < moduleCategory.length; i++) {
            if (moduleCategory[i].checked)
                count3++;
        }
        if (count3 > moduleCategoryMaxCount) {
            alert("模块分类导航最多只能选择" + moduleCategoryMaxCount + "项！");
            return false;
        }
        return true;
    }
</script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_left_top">
                <img alt="" src="images/left-top-right.gif" /></td>
            <td class="td_middle_top">
                <div class="left_topbg">
                    <div class="titlebt">
                        分类导航
                    </div>
                </div>
            </td>
            <td class="td_right_top">
                <img alt="" src="images/nav-right-bg.gif" /></td>
        </tr>
        <tr>
            <td class="td_left_middle">
            </td>
            <td class="td_middle_middle">
                <div class="maincontent">
                    <form id="form1" runat="server">
                        <table cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td colspan="2">
                                    首页导航
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    菜单分类导航：</td>
                                <td class="td_content">
                                    <% Response.Write(MenuCategoryBind()); %>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    新品分类导航：</td>
                                <td class="td_content">
                                    <% Response.Write(NewsCategoryBind()); %>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    促销分类导航：</td>
                                <td class="td_content">
                                    <% Response.Write(PromotionCategoryBind()); %>
                                </td>
                            </tr>
                            <tr>
                                <td class="td_title">
                                    模块分类导航：</td>
                                <td class="td_content">
                                    <% Response.Write(ModuleCategoryBind()); %>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:Button ID="btnSubmit" runat="server" Text="确  定" CssClass="formButton" OnClick="btnSubmit_Click"
                                        OnClientClick="return checkNavigationCategoryForm();" /></td>
                            </tr>
                        </table>
                    </form>
                </div>
            </td>
            <td class="td_right_middle">
            </td>
        </tr>
        <tr>
            <td class="td_left_bottom">
                <img alt="" src="images/buttom_left2.gif" />
            </td>
            <td class="td_middle_bottom">
                <img alt="" src="images/buttom_bgs.gif" />
            </td>
            <td class="td_right_bottom">
                <img alt="" src="images/buttom_right2.gif" />
            </td>
        </tr>
    </table>
</body>
</html>
